//
//  UIImage+darkImage.m
//  TravelGuideMdd
//
//  Created by 陈曦 on 14-3-20.
//  Copyright (c) 2014年 mafengwo.com. All rights reserved.
//

#import "UIImage+darkImage.h"

@implementation UIImage(darkImage)

- (id)imageMakeDark
{
    UIImage *image = self;
    UIGraphicsBeginImageContextWithOptions(image.size, NO, [UIScreen mainScreen].scale);
    
    [image drawInRect:CGRectMake(0, 0, image.size.width, image.size.height)
            blendMode:kCGBlendModeNormal
                alpha:0.6];
    
    UIImage *highlighted = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return highlighted;
}

@end
